17. Exercise: Integration Testing
Exercise: Integration Testing
Use Wiremock to Test TimezoneService
Task Description:
The starter code for this exercise uses another version of the timezones
application. Instead of using the Java11 HttpClient
like our demo example, this application uses a library called retrofit to generate Http Requests. Fortunately, writing an integration test using WireMock works just the same! For this assignment, create another version of your earlier test for getAvailableTimezoneText
. This time, instead of mocking the Client class, you should use WireMock to host an endpoint that will match the one used by the request from TimeZoneService
.
Task Feedback:
Great job!